<div><h3><?=$title ?></h3></div>
<div><? if (isset($add_button)){ echo $add_button; }?></div>
<br /></br /><br /></br />
<table>
<!-- table header -->
	<tr>
<? foreach ($fields as $field) : 
	if ($field instanceof Order_Field) : ?>
		<td><strong><?=html::anchor(
				url::current().'?'.http_build_query(
					array(
						'row' => $field->name,
						'ord' => $field->direction,
					)
				),
				$field->label.' ('.$field->direction_label.')'
			) ?>
		</td>
		</strong>
	<? else : ?>	
	<td><strong><?=$field->label?></strong></td>
	<? endif; ?>
<? endforeach; ?>
	</tr>
<!-- table body -->
<? foreach ($items as $item) : ?>
	<tr>
	<? foreach ($fields as $field) : ?>
		<td><?=$field->put_in_cell($item)?></td>
	<? endforeach; ?>	
	</tr>
<? endforeach; ?>

<!-- table footer -->
</table>
